#include "UniformMat4.h"

/****************************
 *          Public
 ****************************/

    /****************************
     *          Constructors
     ****************************/

        UniformMat4::UniformMat4(){
            Initialize("name", -1, * new Matrix4());
        }

        UniformMat4::UniformMat4(Matrix4 *mat){
            Initialize("name", -1, * mat);
        }

        UniformMat4::UniformMat4(Matrix4 & mat){
            Initialize("name", -1,  mat);
        }

        UniformMat4::UniformMat4(string name, GLuint id){
            Initialize(name, id, * new Matrix4());
        }

        void UniformMat4::Initialize(string name, GLuint id, Matrix4 &mat){
            m_Type=MAT4;
            m_Name  =   name;
            m_Id=id;
            m_Matrix    =   &mat;
        }

    /****************************
     *          Methods
     ****************************/

        /****************************
         *          Virtual
         ****************************/

            void UniformMat4::Send(){
                glUniformMatrix4fv(m_Id, 1, true, m_Matrix->Data());
            }
